1. Field of the Invention
The present invention relates to a pre-compiling device and a method thereof. More specifically, the present invention relates to a pre-compiling device and a method of easily changing a software structure in compliance with a hardware characteristic.
2. Description of the Related Art
Generally, flexibility of a software system can be defined as whether or not the software system can be easily adapted in different circumstances. That is, flexible software can be easily portable into different hardware platforms. When designing a flexible software system, it is essential to employ equipment with somewhat complicated configuration.
In order to realize portability and scalability, source codes should be easily adapted to different hardware parameters (for example, memory size and interrupt request (IRQ) number). Furthermore, different platforms can require different algorithms to perform the same task. Accordingly, algorithm replacement and tuning capability should be supported by a configuration technique. Tuning includes a data type on which the algorithm depends and a few variable constants.
Efficiency of software can be affected by the flexibility. Dynamic, flexible software can restructure itself at run time. In the dynamic, flexible software, the efficiency potentially reduces due to a possible overhead of such a dynamic structure change. In order to avoid the overhead, determinations can be made statically in many cases. That is, if only codes needed in a specific case are extracted from an entire project source and all of other dynamic tests and determinations are excluded, it is possible to obtain compact software having limited functionality needed in the specific case. Accordingly, static resource management and a possibility of including or excluding a source portion should be supported by the configuration technique.
Extensible Markup Language (XML) is a language based on a text that is commonly used to define data elements in a standard scheme. In the XML, a tag structure is used and tags are defined by a document developer. Accordingly, practically any data item can be recognized by the XML.
Meanwhile, software grammar that can be simultaneously applied to a large number of various hardware platforms on a sensor network is needed. Conventionally, there were two methods to solve the problem described above. The two methods are a dynamic change method during run time and a static change method during compiling. The first method has a drawback that OS (operating system) source codes of a Microsoft (MS) window are not suitable for a hardware platform having ultra-light resources. The second method uses a directive, which has a drawback that it is not efficient to simultaneously apply the software developed with the second method to a variety of platforms because each platform is assigned a different directive.